//
// Created by wsl on 2024/10/20.
//

#ifndef YM_SERVER_H
#define YM_SERVER_H

#include "stm32f10x.h"                  // Device header
#include "bsp_usart.h"
#include "tb6612.h"
#include "rc522.h"
#include "mq.h"
#include "dht11.h"
#include "oled.h"
#include "button.h"

#define null            ((void*)0)
#define DCMotor_MaxSpeed    (500)

typedef struct {
    uint8_t tem;
    uint8_t hum;
    uint8_t mq2;
    uint8_t mq135;
} Warning_State_Typedef;

typedef struct {
    float tem;
    float hum;
    float mq2;
    float mq135;
} Warning_Num_Typedef;

typedef struct {
    int16_t FanSpeed;
    int16_t RangeHoodSpeed;
    uint8_t scale;
} DCMotor_Speed_Typedef;

typedef void            (*TaskFunc_100Hz_Typedef)();



void TaskFunc_1Hz_Init(TaskFunc_100Hz_Typedef taskFunc_100Hz);
void Init(void);
void Menu(void);
void DataUpdate(void);
#endif //YM_SERVER_H
